package com.tsd.jxc.stock.service;

import com.tsd.core.vo.HttpResult;
import com.tsd.core.vo.PageBean;
import com.tsd.jxc.stock.entity.JxcStockInbill;
import com.tsd.jxc.stock.entity.JxcStockInbillExt;
import com.tsd.system.entity.SysUser;
import com.tsd.system.entity.SysUserExt;

import java.util.List;
import java.util.Map;

/**
 * 描述：JxcStockInbill服务实现层接口
 *
 * @author Hillpool
 * @date 2022/07/29 15:06:33
 */
public interface JxcStockInbillService {

    /**
     * 描述：根据id获取JxcStockInbill
     *
     * @param id
     */
    JxcStockInbill getJxcStockInbillById(Long id) throws Exception;

    /**
     * 描述：根据sid获取JxcStockInbill
     *
     * @param sid
     */
    JxcStockInbillExt queryBySid(String sid) throws Exception;

    /**
     * 描述：根据sid列表删除JxcStockInbill
     *
     * @param list
     */
    void deleteJxcStockInbills(List<String> list, SysUser opUser) throws Exception;

    /**
     * 描述：保存或更新JxcStockInbill
     *
     * @param record
     * @param opUser
     */
    void saveJxcStockInbill(JxcStockInbillExt record, SysUser opUser) throws Exception;

    /**
     * 描述：根据params分页查询JxcStockInbill
     *
     * @param params
     * @param page
     */
    List<JxcStockInbillExt> findJxcStockInbills(Map<String, Object> params, PageBean page) throws Exception;

    /**
     * 描述：根据params分页查询JxcStockInbill
     *
     * @param params
     */
    List<JxcStockInbillExt> findJxcStockInbills(Map<String, Object> params) throws Exception;

    HttpResult<Object> changeJxcStockInbillAuditState(List<String> sidList, Integer state, SysUserExt opUser) throws Exception;

    void executeJxcStockInbill(List<String> sidList, SysUserExt opUser) throws Exception;

    /**
     * 描述：导出-包含明细
     *
     * @param params
     * @param page
     * @return
     */
    List<JxcStockInbillExt> findJxcStockInbillsIncludeDetail(Map<String, Object> params, PageBean page) throws Exception;

    List<JxcStockInbillExt> queryJxcStockInBillData4Print(List<String> sidList) throws Exception;

    List<JxcStockInbillExt> queryBySrcSid(List<String> list, int dr);

    /**
     * 取消入库操作
     * @param sidList
     * @param opUser
     * @throws Exception
     */
    void cancelExecuteJxcStockInbill(List<String> sidList, SysUserExt opUser) throws Exception;
}
